package yeschat;

    import java.rmi.registry.LocateRegistry;  
    import java.rmi.registry.Registry;  
        
    public class Cliente {
        
        public static void main(String[] args){    
           Bina obina;
           try{    

               Registry registry = LocateRegistry.getRegistry("localhost", 1000);
               //Registry registry = LocateRegistry.getRegistry();

               InterfaceComunicacao stub = (InterfaceComunicacao) registry.lookup ("Servidor");
                 
               obina = stub.getBina();
               System.out.println("Resposta: " + obina.getDescricao());

           }catch(Exception e){  
               System.out.println(e.getMessage());  
           }  
      }
  }